function Rest() {

}
var statusCode = {
    OK: 200,
    CREATED: 201,
    Accepted: 202,
    NO_CONTENT: 204,
    INVALID_REQUEST: 400,
    Unauthorized: 401,
    Forbidden: 403,
    NOT_FOUND: 404,
    Not_Acceptable: 406,
    Gone: 410,
    Unprocesable_entity: 422,
    INTERNAL_SERVER_ERROR: 500
}
Rest.prototype.statusCode = statusCode;
Rest.prototype.success = function (msg, err) {
    return {
        code: 200,
        msg: '成功',
        err: ''
    }
}
Rest.prototype.failed = function (msg, err) {
    return {
        code: 400,
        msg: msg,
        err: err
    }
}
module.exports = new Rest();